/* 
 * File:   commonMutex.cpp
 * Author: agu
 * 
 * Created on 15 de mayo de 2014, 16:00
 */

#include <stdlib.h>
#include <pthread.h>
#include "commonMutex.h"

commonMutex::commonMutex() {
    pthread_mutex_init(this->mutex, NULL);
}

commonMutex::commonMutex(const commonMutex& orig) {
    this->mutex = orig.mutex;
}

commonMutex::~commonMutex() {
    pthread_mutex_destroy(this->mutex);
}

void commonMutex::lock(){
    pthread_mutex_lock(this->mutex);
}
void commonMutex::unlock(){
    pthread_mutex_unlock(this->mutex);
}
